package com.qzsoft.zhjd.server.socket.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @ClassName TcpEnvConfig
 * @Description 环境设备配置信息
 * @author linhuawei
 * @since 2022-02-23
 */
@Component
public class TcpEnvConfig {

    @Value("${tcp.env.enable:false}")
    private boolean enable;

    @Value("${tcp.env.port:8912}")
    private Integer port;

    @Value("${tcp.env.boss_count:2}")
    private Integer bossCount;

    @Value("${tcp.env.worker_count:20}")
    private Integer workerCount;

    @Value("${tcp.env.so_keeplive:true}")
    private Boolean soKeeplive;

    @Value("${tcp.env.so_backlog:200}")
    private Integer soBacklog;

    public boolean isEnable() {
        return enable;
    }

    public Integer getPort() {
        return port;
    }

    public Integer getBossCount() {
        return bossCount;
    }

    public Integer getWorkerCount() {
        return workerCount;
    }

    public Boolean getSoKeeplive() {
        return soKeeplive;
    }

    public Integer getSoBacklog() {
        return soBacklog;
    }

}
